package com.xiaoxing.zhinenghuacangku.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.xiaoxing.zhinenghuacangku.mvp.contract.YiKuContract;
import com.xiaoxing.zhinenghuacangku.mvp.model.YiKuModel;


@Module
public class YiKuModule {
    private YiKuContract.View view;

    /**
     * 构建YiKuModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public YiKuModule(YiKuContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    YiKuContract.View provideYiKuView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    YiKuContract.Model provideYiKuModel(YiKuModel model) {
        return model;
    }
}